﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../extjs/resources/css/ext-all-gray.css" rel="stylesheet" />
    <script src="../Scripts/ext-all.js"></script>
    <script src="../extjs/ux/IFrame.js"></script>
</head>
<body>
    <script type="text/javascript">
        //Ext.Loader.setPath('Ext.ux', '~/extjs/ux');
        //Ext.require('Ext.ux.IFrame');
        //TEST STUFF
        var tpanel = Ext.create('Ext.ux.IFrame', {
            //title: 'Hello',
            border: false,
            src: 'http://genk.vn'
        });

        var stuff = Ext.create('Ext.Window', {
            title: 'Test IFrame',
            width: 600,
            height: 500,
            layout: 'fit',
            renderTo: Ext.getBody(),
            items: tpanel,
            buttons: [{
                    text: 'Sencha',
                    scope: tpanel,
                    handler: function () {
                        this.update('http://www.sencha.com', true);
                    }
                }, {
                    text: 'Reset',
                    scope: tpanel,
                    handler: function () {
                        this.reset();
                    }
                }, {
                    text: 'Reload',
                    scope: tpanel,
                    handler: function () {
                        this.reload();
                    }
                }, {
                    text: 'Add Some Content',
                    scope: tpanel,
                    handler: function () {
                        this.update('<div><b>Some Content....</b></div>');
                    }
                }, {
                    text: 'Destroy',
                    scope: tpanel,
                    handler: function () {
                        this.destroy();
                    }
                }]
        });

        Ext.onReady(function () {
            stuff.show();
        });
    </script>
</body>
</html>
